{include 'header.tpl'}
<ol class="breadcrumb">
    <li><a href="/admin/Order/list">小红薯订单管理列表</a></li>
    <li><a href="/admin/Order/listD">已处理订单列表</a></li>
    <li><a href="/admin/Order/listDel">订单删除列表</a></li>
</ol>
<form method="get" action="/admin/Order/listDel" class="form-inline">
    <table>
        <tr>
            <td>
                <label for="form-w" class="control-label">昵称：</label>
                <input class="form-control" id="nickname" name="nickname" value="{$smarty.get.nickname}" placeholder="" size="6"/>
            </td>
            <td>
                <label for="form-w" class="control-label">联系电话：</label>
                <input class="form-control" id="mobile" name="mobile" value="{$smarty.get.mobile}" placeholder="" size="10"/>
            </td>

           {* <td>
                <label for="form-w" class="control-label">来源：</label>
                <input class="form-control" id="source" name="source" value="{$smarty.get.source}" placeholder="" size="10"/>
            </td>

            <td>
                <label for="form-w" class="control-label">主渠道id：</label>
                <input class="form-control" id="c_uid" name="c_uid" value="{$smarty.get.c_uid}" placeholder="" size="10"/>
            </td>

            <td>
                <label for="form-w" class="control-label">子渠道id：</label>
                <input class="form-control" id="s_uid" name="s_uid" value="{$smarty.get.s_uid}" placeholder="" size="10"/>
            </td>
*}
           {* <td>
                <label for="form-w" class="control-label">时间范围：</label>
                <input type="text" class="date-picker" id="begin_date" name="begin_date" value="{$smarty.get.begin_date}" style="width: 85px;"/> 至 <input type="text" class="date-picker" id="end_date" name="end_date" value="{$smarty.get.end_date}" style="width: 85px;"/>
            </td>*}
            <td>
                <label for="form-w" class="control-label">加盟意向：</label>
                <select id="intention" name="intention" class="form-control" style="width: 135px;padding-left: 4px;padding-right: 4px;">
                    <option {if $smarty.get.intention eq ""}selected{/if} value="">请选择加盟意向</option>
                    <option  {if $smarty.get.intention eq 1}selected{/if} value="1">单店加盟</option>
                    <option  {if $smarty.get.intention eq 2}selected{/if} value="2">区域加盟</option>
                </select>
            </td>

            <td>
                <button type="submit" class="btn btn-primary">查找</button>
                <a href="/admin/Order/list" class="btn btn-danger">清空条件</a>
                {*<button type="button" onclick="dao()" class="btn btn-primary">导出</button>*}
            </td>
        </tr>
    </table>
</form>
<div class="clearfix" style="height:30px;"></div>
<table class="table" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
    <tr>
        <td>ID</td>
        <td>昵称</td>
        <td>联系电话</td>
        <td>加盟意向</td>
        <td>地址</td>
        <td>来源</td>
        <td>主渠道</td>
        <td>子渠道</td>
        <td>时间</td>
        <td>状态</td>
        <td>操作</td>
    </tr>
    {foreach from=$data item=item}
        <tr>
            <td>{$item.id}</td>
            <td>{$item.nickname}</td>
            <td>{$item.mobile}</td>
            <td>
                {if $item.join_intention eq 1}单店加盟{/if}
                {if $item.join_intention eq 2}区域加盟{/if}
            </td>
            <td>{$item.pro}--{$item.cit}</td>
            <td>{$item.source}</td>
            <td>{$item.c_uid}</td>
            <td>{$item.s_uid}</td>
            <td>{$item.create_time}</td>
            <td>
                <span style="color: #4cae4c">{if $item.status eq 1}未处理{/if}</span>
                <span style="color: #ff3b36">{if $item.status eq 2}已联系{/if}</span>
                <span style="color: #ff3b36">{if $item.status eq 3}删除状态{/if}</span>
            </td>
            <td>
                <a onclick="return confirm('确定要删除此域名？');" href="/admin/Order/modifyStatus?id={$item.id}&status=1" rel="ajax">恢复</a>
                <a onclick="return confirm('确定要删除此域名？');" href="/admin/Order/del?id={$item.id}" rel="ajax">彻底删除</a>
            </td>
        </tr>
    {/foreach}
</table>
{include "pager.tpl"}
<script type="text/javascript">
    $(function () {
        create_date_picker();
    });

    function dao(){
        var nickname = $('#nickname').val();
        var mobile = $('#mobile').val();
        var begin_date = $('#begin_date').val();
        var end_date = $('#end_date').val();
        var intentionE1=$("#intention option:selected");
        var intention = intentionE1.val();
//        alert(intention);
//        alert(nickname);
//        alert(mobile);
//        alert(end_date);

        location.href = "/admin/Order/excelDao?begin_date=" + begin_date + "&end_date=" + end_date+ "&nickname=" + nickname+ "&mobile=" + mobile + "&intention=" + intention;

    }
</script>
{include 'footer.tpl'}